package com.kc.gb.feign.ptl.support.enums;

public enum PtlLedOnOff {
    LED_ON((byte) 0,"常亮"),
    LED_OFF((byte) -2,"关闭"),
    LED_FLASH((byte) -1,"以默认频率闪动"),
    LED_CLOSE_ALL((byte) -3,"全部关闭"),
    ;

    /**
     * LED显示管的状态控制
     */
    public final static short LED_STAY_ON = 0;//保持常亮
    /**
     * The constant LED_DEFAULT_FLASH_INTERVAL.
     */
    public final static short LED_DEFAULT_FLASH_INTERVAL = -1;//以默认频率闪动
    /**
     * The constant LED_SATY_OFF.
     */
    public final static short LED_SATY_OFF = -2;//LED关闭
    /**
     * The constant ALL_SATY_OFF.
     */
    public final static short ALL_SATY_OFF = -3;//全部关闭

    /**
     * 错误码
     */
    private byte code;

    /**
     * 错误信息
     */
    private String desc;


    /**
     * 使用错误码和错误信息构造枚举
     *
     * @param code    错误码
     * @param message 错误信息
     */
    PtlLedOnOff(byte code, String message) {
        this.code = code;
        this.desc = message != null ? message : "";
    }

    /**
     * 获取错误码
     *
     * @return String
     */
    public byte getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
